package pulpfizz.physics.contact;

import org.jbox2d.dynamics.Body;
import org.jbox2d.dynamics.BoundaryListener;

import pulpfizz.physics.NewWorld;

/**
 * Calls boundaryViolated(Body) on violation.
 *
 */
public class ConcreteBoundaryListener implements BoundaryListener {
	/**
	 * 
	 */
	private NewWorld newWorld;

	/**
	 * @param physicsHandler
	 */
	public ConcreteBoundaryListener(NewWorld physicsHandler) {
		this.newWorld = physicsHandler;
	}

	public void violation(Body body) {
		this.newWorld.boundaryViolated(body);
	}
}